<?php include_once './application/views/sys_admin/common/header.php';  ?>
<div class=" definewidth m20">
		<form id="searchForm" action="/sys_admin/accountlog/zhs_accountlogalllist/" method="get" class="form-inline definewidth m20">
		<?php echo $username?>
  				会员名：<input type="text" id="username" name="username" style="width: 100px;" value="<?php echo $username?>" />	
	  			状态：<select id="ftype" name="ftype">
	  				<option value="0" <?php if($ftype==0){?>selected="selected"<?php }?>>所有</option>
	  				<?php foreach($account_type as $key=>$value){?>
	  				<option value="<?php echo $key?>" <?php if($ftype==$key){?>selected="selected"<?php }?>><?php echo $value;?></option>
	  				<?php }?>
	  			</select>
	  			开始时间：<input type="text" id="strtime" name="strtime" style="width: 100px;" value="<?php echo $strtime;?>"  onfocus="WdatePicker()" class="Wdate"/>
	  			结束时间：<input type="text" id="endtime" name="endtime" style="width: 100px;" value="<?php echo $endtime;?>"  onfocus="WdatePicker()" class="Wdate"/>
	  			<button type="button" class="btn btn-primary"  onclick="this.form.submit();" >查询</button>
	  			<button type="button" class="btn btn-success"  onclick="href('/sys_admin/accountlog/accountlogallexcel/?username=<?php echo $username;?>&ftype=<?php echo $ftype;?>&utype=<?php echo $utype;?>&strtime=<?php echo $strtime;?>&endtime=<?php echo $endtime;?>');" >导出数据</button>
	  	</form>
		<table class="table table-bordered table-hover definewidth m10">
			 <thead>
			    <tr>
			        <th><strong>序号</strong></th>
					<th><strong>会员名</strong></th>
					<th><strong>操作状态</strong></th>
					<th><strong>账户总额</strong></th>
					<th><strong>影响金额</strong></th>
					<th><strong>可用金额</strong></th>
					<th><strong>冻结金额</strong></th>
					<th><strong>待收金额</strong></th>
					<th><strong>变更原因</strong></th>
					<th><strong>发生时间</strong></th>
			    </tr>
			   </thead>
			  <?php foreach($accountlog_list as $key=>$accountlog){?>
			  <tr>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $accountlog['id'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><a href="javascript:search('<?php echo $accountlog['username'];?>');"><?php echo $accountlog['username'];?></a></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $account_type[$accountlog['ftype']];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo number_format($accountlog['total'],2);?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo number_format($accountlog['money'],2);?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo number_format($accountlog['use_money'],2);?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo number_format($accountlog['no_use_money'],2);?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo number_format($accountlog['collection'],2);?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $accountlog['remark'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo date('Y-m-d H:i:s',$accountlog['add_time']);?></td>
			  </tr>
			  <?php }?>
			  	<tr>
			  	<td colspan="12"  class="page"><?php echo $this->pagination->create_links();?></td>
			  	</tr>
		</table>
</div>
<script>
function search(username){
	$("#username").val(username);
	$("#searchForm").submit();
}
</script>
